package com.hehui.module.customer.dao;


import com.hehui.module.customer.entity.BaseCustomer;
import com.hehui.module.customer.entity.CustomerType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CustomerTypeMapper {
    public List<CustomerType> selectAllList(CustomerType customerType);

    public  int deleteByPrimaryKey(Long ctTypeid);

    public  int insert(CustomerType record);

    public  int insertSelective(CustomerType record);

    public  CustomerType selectByPrimaryKey(Long ctTypeid);

    public int updateByPrimaryKeySelective(CustomerType record);

    public List<BaseCustomer> checkHasCustomerByTypeId(Long typeId);

    public List<CustomerType>  checkCustomerTypeNameUnique(@Param("typeName") String typeName ,@Param("merchantId") Long merchantId);
    //获取该商户下最后一条数据的编号
    public String getMaxNum(Long merchantId);
    //校验编号的唯一性
    public List<CustomerType> checkCustomerTypeNumUnique(@Param("typeNum") String typeNum,@Param("merchantId") Long merchantId);

    //把默认设置为非默认
    public int setUndefault(Long merchantId);

}